package chat.clients.gtalk;

import chat.clients.XmppClient;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;

public class GTalkClient extends XmppClient {
    public static final String HOST = "talk.google.com";
    public static final String SERVICE_NAME = "gmail.com";

    public static final GTalkClient INSTANCE = new GTalkClient();

    private GTalkClient() {
    }

    public String connect() throws XMPPException {
        setState(CONNECTING);
        connection = new XMPPConnection(new ConnectionConfiguration(HOST, XMPP_DEFAULT_PORT, SERVICE_NAME));
        connection.connect();

        return connection.getConnectionID();
    }

}
